	
	<div class="users index">
	<h2><?php echo __('Permissão para o usuário'); ?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo "Ação"; ?></th>
			<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		foreach($acos as $aco)
		{
			
			if(count($aco['Filhos']))
			{
				?>
					<tr>
						<td><?php echo h($aco['Acos']['name']); ?>&nbsp;</td>
						<td class="actions">
							<?php if($perm[$aco['Acos']['id']]): ?>
							<?php echo $this->Html->link(__('Deny'), array('action' => 'permissions', $id, '?' => array(
                                        'perm' => 'deny',
                                        'aro' => $id,
                                        'aco' => $aco['Acos']['alias']
                                    ))); ?>
                            <?php else: ?>
                            	<?php echo $this->Html->link(__('Allow'), array('action' => 'permissions', $id, '?' => array(
                                        'perm' => 'allow',
                                        'aro' => $id,
                                        'aco' => $aco['Acos']['alias']
                                    ))); ?>
                        	<?php endif; ?>
						</td>
					</tr>
				<?
				foreach ($aco['Filhos'] as $son) {
					?>
					<tr>
						<td><?php echo h($aco['Acos']['name'].'/'.$son['name']); ?>&nbsp;</td>
						<td class="actions">
							<?php if($perm[$son['id']]): ?>
							<?php echo $this->Html->link(__('Deny'), array('action' => 'permissions', $id, '?' => array(
                                        'perm' => 'deny',
                                        'aro' => $id,
                                        'aco' => $aco['Acos']['alias'].'/'.$son['alias']
                                    ))); ?>
                            <?php else: ?>
                            	<?php echo $this->Html->link(__('Allow'), array('action' => 'permissions', $id, '?' => array(
                                        'perm' => 'allow',
                                        'aro' => $id,
                                        'aco' => $aco['Acos']['alias'].'/'.$son['alias']
                                    ))); ?>
                        	<?php endif; ?>
							<?php //cho $this->Html->link(__('Edit'), array('action' => 'edit', $user['User']['id'])); ?>
							<?php //echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $user['User']['id']), null, __('Are you sure you want to delete # %s?', $user['User']['id'])); ?>
						</td>
					</tr>
					<?
				}
				
			}
		}
	?>
	</table>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('New User'), array('action' => 'add')); ?></li>
		<li><?php echo $this->Html->link(__('List Groups'), array('controller' => 'groups', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Group'), array('controller' => 'groups', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Posts'), array('controller' => 'posts', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Post'), array('controller' => 'posts', 'action' => 'add')); ?> </li>
	</ul>
</div>
